const wxHttpHandler = require('../../utils/wxHttpHandler.js');
const api = require('../../APIConfig/apiConfig.js');
var app = getApp();

Page({
  data: {
    datas: []
  },
  onShow: function () {
    this.ColdStorageList()
  },

  //温控列表
  ColdStorageList: function () {
    let data = {

    }
    const that = this
    wx.showLoading()
    wxHttpHandler({
      type: 'post',
      path: api.ColdStorageList+wx.getStorageSync('id'),
      data: data,
      fn: function (res) {
        wx.hideLoading()
        if (res.code == 0) {
          if (res.data != null && res.data.length > 0) {
            that.setData({
              datas: res.data
            })

          }
        } else {
          wx.showToast({
            title: res.desc,
            icon: 'none',
            duration: 1500,
            mask: true
          });
        }
      }

    })
  },
})